export default (state=[],action)=>{
    switch (action.type) {
        case "MENU_BREAD":
                return createMenuBread(state,action);
            break;
    
        case "ADD_BREAD":
        return addMenuBread(state,action);
            break;
        default:
            return state;
            break;
    }
};

const createMenuBread =(preState,action)=>{
    return action.breadArr;
};
const addMenuBread = (preState,action)=>{
    return [
        ...preState,
        ...action.breadArr,
    ];
};